<!--
 * @Author: GongSaiPeng
 * @Date: 2024-04-11 16:24:57
 * @LastEditTime: 2024-04-11 20:58:26
 * @LastEditors: GongSaiPeng
 * @Description: 使用vfrom给项目添加快速搭建表单、实现表单交互和数据收集的功能
 * @FilePath: \main-app\src\components\vForm\VFormDesigner.vue
-->
<script setup lang="ts" name="">
import { ref, reactive, onMounted } from "vue";
import formJson from "./formJson.json";
let designerConfig = reactive({
  //是否禁止修改唯一名称
  widgetNameReadonly: false,
});
const vFormDesignerRef = ref();
onMounted(() => {
  console.log(formJson);
  console.log(vFormDesignerRef.value);
  vFormDesignerRef.value.setFormJson(formJson);
});
</script>

<template>
  <div>
    <v-form-designer
      ref="vFormDesignerRef"
      :designer-config="designerConfig"
      :form-json="formJson"
    ></v-form-designer>
  </div>
</template>

<style lang="less" scoped></style>
